﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using ZhiAo.WebLib.Data;
using ZhiAo.CommonLibrary;

public partial class ShuiWenJu_RepRealTime_MsLineIframe : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string act = PageHelper.Request("act");
        switch (act)
        {
            case "site":
                RespSite();
                break;
            default:
                LoadSiteName();
                break;
        }
    }

    private void RespSite()
    {
        string currentSiteID = Session["currentSiteId"] == null ? "" : Session["currentSiteId"].ToString();
        Response.Write(currentSiteID);
        Response.End();
    }

    private void LoadSiteName()
    {
        string currentSiteID = Session["currentSiteId"] == null ? "" : Session["currentSiteId"].ToString();
        string siteName = "";
        string sql = " SELECT STNM FROM SQ_STBPRP_B WHERE YR_STCD = '" + currentSiteID + "'";
        DataTable dtSite = DBHelper.GetDataTable(sql);
        if (dtSite.Rows.Count > 0)
        {
            siteName = dtSite.Rows[0][0].ToString();
        }
        this.ltSiteName.Text = siteName;
    }
}
